<div class="fly-header layui-bg-black">
    <div class="layui-container">
        <a class="fly-logo" href="/">
        <img src="__STATIC__/images/logo.png" alt="layui" style='width: 190px;'>
    </a>
        <ul class="layui-nav fly-nav layui-hide-xs"> 
            {if condition="(isset($tagval)&&$tagval==0)"}
            <li class="layui-nav-item layui-this">
                {else /}
                <li class="layui-nav-item">
                    {/if}
                <a href="{:url('web/Problem/problemset')}"><i class="layui-icon">&#xe60a;</i>  问题列表</a>
            </li>
            {if condition="(isset($tagval)&&$tagval==1)"}
            <li class="layui-nav-item layui-this">
                {else /}
                <li class="layui-nav-item">
                    {/if}
                <a href="{:url('web/Problem/status')}"><i class="layui-icon" >&#xe63c;</i>  提交状态</a>
            </li>
            {if condition="(isset($tagval)&&$tagval==2)"}
            <li class="layui-nav-item layui-this">
                {else /}
                <li class="layui-nav-item">
                    {/if}
                <a href="{:url('web/Ranklist/index')}"><i class="layui-icon" >&#xe735;</i>  排名</a>
            </li>
            {if condition="(isset($tagval)&&$tagval==3)"}
            <li class="layui-nav-item layui-this">
                {else /}
                <li class="layui-nav-item">
                    {/if}
                <a href="{:url('web/Contest/index')}"><i class="layui-icon" >&#xe756;</i>  比赛</a>
                <script>
                    var num = {$contest_num};
                    var item = localStorage.getItem('{$login_userid}-konw-contest');
                    if(num > 0 && item != "true"){
                        document.write("<span class=\"layui-badge-dot\" style='left: 85px;top: 28px;'></span>");
                    }
                </script>
            </li>
                
        </ul>
        {eq name="login_userid" value=""}
        <ul class="layui-nav fly-nav-user">
            <li class="layui-nav-item">
                <a class="iconfont icon-touxiang layui-hide-xs" id="user-head" href="#"></a>
            </li>
            <li class="layui-nav-item">
                <a href="#" id="login-register">登入/注册</a>
            </li>
        </ul>
        {else/}
        <ul class="layui-nav fly-nav-user">
            <!-- 登入后的状态 -->
            <li class="layui-nav-item">
                <a class="fly-nav-avatar" href="javascript:;">
                    <cite class="layui-hide-xs">{$login_userid}</cite>
                    
                    <img src="__STATIC__/../upload/users/head/{$headimg}">
                    
                </a>
                <dl class="layui-nav-child">
                    <dd><a href="{:url('web/Account/alterInfo')}">
                  <i class="layui-icon">&#xe614;</i>
                  信息修改</a>
                    </dd>
                    <dd><a href="{:url('web/Message/messageset')}">
                              <i class="layui-icon">&#xe611;</i>
                              消息{if condition="$readmsg!=0"}
                                <span class="layui-badge">{$readmsg}</span>
                              {/if} </a>
                    </dd>
                    {if condition="$is_admin==true"}<dd>
                        <a href="{:url('admin/Index/home')}">
                  <i class="layui-icon">&#xe638;</i>
                  后台管理</a>
                    </dd>{/if}
                    <hr style="margin: 5px 0;">
                    <dd><a href="{:url('web/User/do_logout')}" style="text-align: center;">退出</a></dd>
                </dl>
                
            </li>
            {if condition="$readmsg!=0"}<span class="layui-badge-dot" style="float: right;"></span>{/if}
        </ul>
        {/eq}
    </div>
</div>